#ifndef __RECOMMANDER_H__
#define __RECOMMANDER_H__

#include <set>
#include <vector>
#include <queue>
#include <memory>

using std::set;
using std::string;
using std::vector;
using std::queue;
using std::priority_queue;
using std::shared_ptr;

class TcpConnection;

class KeyRecommander
{
    using TcpConnectionPtr = shared_ptr<TcpConnection>;
public:
    KeyRecommander(string &query, const TcpConnectionPtr &);
    ~KeyRecommander();

    void execute();
    void queryIndexTable();
    void statistic(set<int> &iset);
    int distance(const string &rhs);
    void response();

private:
    string _queryWord;
    TcpConnectionPtr _coon;
    /* priority_queue<MyResult, vector<MyResult>, MyCompare> _resultQue; */
};


#endif
